<h1>Listing events</h1>

<table>
  <tr>
    <th>Title</th>
    <th>Starts at</th>
    <th>Ends at</th>
    <th>All day</th>
    <th>Description</th>
    <th></th>
    <th></th>
    <th></th>
  </tr>

<% @events.each do |event| %>
  <tr>
    <td><%= event.title %></td>
    <td><%= event.starts_at %></td>
    <td><%= event.ends_at %></td>
    <td><%= event.all_day %></td>
    <td><%= event.description %></td>
    <td><%= link_to 'Show', event %></td>
    <td><%= link_to 'Edit', edit_event_path(event) %></td>
    <td><%= link_to 'Destroy', event, :confirm => 'Are you sure?', :method => :delete %></td>
  </tr>
<% end %>
</table>

<br />
<%= link_to 'view calendar', calendar_index_path %>
